{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=362
  Verdict: Accepted
}
uses SysUtils, Math;
 
var
	i,j,n,m:longint;
	a:array[0..1010,0..1010] of int64;
 
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
read(n,m);
fillchar(a,sizeof(a),0);
for i:=1 to n do
	for j:=1 to m do
		if (i=1) or (j=1) then a[i][j]:=1 else a[i][j]:=a[i-1][j]+a[i][j-1];
for i:=1 to n do begin
	for j:=1 to m do
		write(a[i][j]:6);
	writeln;
end;
end.